<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
    <meta name="keywords" content="jollitycn,聊天室,Vue,Socket.io,JavaScript,ES6,Vue.js,HTML5,Koa">
    <meta name="description" content="Vue 聊天室 Socket.io jollitycn JavaScript ES6 Vue.js HTML5 Koa jollitycn">
    <title>智能聊天室 Vue Chat Powered by jollitycn.com</title>
  </head>
  <body>
    <div id="app"></div>
    <!-- built files will be auto injected -->

    <script src="http://jollitycn.com/ms-web/js/socket.io/socket.io.js"></script>

    <script>
     // var  userName = 'test1';
      //  ?username=vue-test&password=123456
   let socket= null;


      // socket.reconnect = true;

      //
      // socket.on('connect', function () {
      //   output('<span class="connect-msg">Client has connected to the server!</span>');
      // });
      //
      // socket.on('chatevent', function (data) {
      //   output('<span class="username-msg">' + data.userName + ':</span> ' + data.message);
      // });
      //
      // socket.on('disconnect', function () {
      //   output('<span class="disconnect-msg">The client has disconnected!</span>');
      // });
      //
      // function sendDisconnect() {
      //   $('#console').prepend(");
      //   socket.disconnect();
      // }
      //
      // function sendMessage() {
      //   var message = $('#msg').val();
      //   $('#msg').val('');
      //
      //   var jsonObject = {
      //     userName: userName,
      //     message: message
      //   };
      //   socket.emit('chatevent', jsonObject, function (data) {
      //     $('#console').prepend(data);
      //   });
      // }
      //
      // function output(message) {
      //   var currentTime = "<span class='time'>" + moment().format('HH:mm:ss.SSS') + "</span>";
      //   var element = $("<div>" + currentTime + " " + message + "</div>");
      //   $('#console').prepend(element);
      // }
      //
      // $(document).keydown(function (e) {
      //   if (e.keyCode == 13) {
      //     $('#send').click();
      //   }
      // });
    </script>
    <script>
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?ce268e8f61069a1636a4629acbb82b9a";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
    </script>

  </body>
</html>
